﻿using System;
using System.Windows.Input;
using System.Windows.Controls;

namespace MMK.Paket_Tracker.Runtime.Commands
{
    /// <summary>
    /// 
    /// </summary>
    public class PTCommands
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PTCommands"/> class.
        /// </summary>
        public PTCommands() { }

        /// <summary>
        /// Returns a command for a new packet.
        /// </summary>
        /// <value>The command for a new packet.</value>
        public static RoutedUICommand NewPacket 
        { 
            get 
            {
                if (newPacket == null)
                {
                    newPacket = new NewPacket();
                }
                return newPacket; 
            } 
        }

        /// <summary>
        /// Returns a command to get the status of a sent packet.
        /// </summary>
        /// <value>The command to get a status</value>
        public static RoutedUICommand GetStatus
        {
            get
            {
                if (getStatus == null)
                {
                    getStatus = new GetStatus();
                }
                return getStatus;
            }
        }

        /// <summary>
        /// Gets the GoBack command.
        /// </summary>
        /// <value>A GoBack RoutedUICommand.</value>
        public static RoutedUICommand GoBack
        {
            get
            {
                if (goBack == null)
                {
                    goBack = new GoBack();
                }
                return goBack;
            }
        }

        /// <summary>
        /// Gets the GoOn command.
        /// </summary>
        /// <value>A GoBack RoutedUICommand.</value>
        public static RoutedUICommand GoOn
        {
            get
            {
                if (goOn == null)
                {
                    goOn = new GoOn();
                }
                return goOn;
            }
        }

        /// <summary>
        /// Gets the ChangeSender command.
        /// </summary>
        /// <value>A ChangeSender RoutedUICommand.</value>
        public static RoutedUICommand ChangeSender
        {
            get
            {
                if (changeSender == null)
                {
                    changeSender = new ChangeSender();
                }
                return changeSender;
            }
        }

        /// <summary>
        /// Gets the ChangeSender command.
        /// </summary>
        /// <value>A ChangeSender RoutedUICommand.</value>
        public static RoutedUICommand ChangeReceiver
        {
            get
            {
                if (changeReceiver == null)
                {
                    changeReceiver = new ChangeReceiver();
                }
                return changeReceiver;
            }
        }

        /// <summary>
        /// Gets the ChangeSender command.
        /// </summary>
        /// <value>A ChangeSender RoutedUICommand.</value>
        public static RoutedUICommand ChangeWeight
        {
            get
            {
                if (changeWeight == null)
                {
                    changeWeight = new ChangeWeight();
                }
                return changeWeight;
            }
        }


        private static RoutedUICommand newPacket;
        private static RoutedUICommand getStatus;
        private static RoutedUICommand goBack;
        private static RoutedUICommand goOn;
        private static RoutedUICommand changeSender;
        private static RoutedUICommand changeReceiver;
        private static RoutedUICommand changeWeight;
    }
   
}
